cmake_minimum_required(VERSION 3.16)
project(os)

set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED on)
set(CMAKE_CXX_COMPILE_FEATURES)
set(CMAKE_CXX_FLAGS "${CAMKE_CXX_FLAGS} -std=c++23 -pthread")

if (EXISTS /usr/local/bin/gcc)
    set(CMAKE_C_COMPILER "/usr/local/bin/gcc")
    set(CMAKE_CXX_COMPILER "/usr/local/bin/g++")
elseif(EXISTS /usr/bin/gcc)
    set(CMAKE_C_COMPILER "/usr/bin/gcc")
    set(CMAKE_CXX_COMPILER "/usr/bin/g++")
else()
    message(STATUS "没有编译器可用")
    return()
endif ()

add_executable(os main.c)
